/****************************************************************
 *  This file created by writerB.php on 03/18/2007 at 09:52:32  *
 ****************************************************************
 *  writerB.php created by Tonk (tonk@ctonk.com) in 2007        *
 ****************************************************************
 *                 General Document Information
 *
 *  File Name: combined.h
 *  Class Names: Area, Room, Object, Creature, Character, Mob
 *  Notes:	This .h file is a combination header file for Area,
 *			Room, Character, Creature, Mob, and Object.  It has
 *			to be done this way so that each class can see and
 *			use the functionality of all the other classes,
 *			otherwise we'd run into circular inclusion logic and
 *			errors involving the "use of undefined structs".
 ****************************************************************/

#ifndef __H_COMBINED
#define __H_COMBINED

#include <fstream>
#include <iostream>
#include <vector>
#include "board.h"
#include "definitions.h"
#include "exit.h"
#include "note.h"
#include "reset.h"
#include "socket.h"

class Area;
class Room;
class Object;
class Creature;
class Character;
class Mob;

//////////////////////////////////////////////   AREA   //////////////////////////////////////////////

class Area {
	protected:
		// Protected data...
		int			_AreaID;	// Holds a unique value for every instantiation.
		unsigned	_firstv;	// First vnum the area owns
		unsigned	_lastv;		// Last vnum the area owns
		unsigned	_size;		// Number of vnums the area owns (should always be a multiple of 25)
		int			_flags;
		time_t		_nextReset;
		std::string	_keyword;
		std::string	_file;
		std::string	_name;
		std::vector< Room* >		_rooms;
		std::vector< Mob* >			_mobs;
		std::vector< Object* >		_objects;
		std::vector< Reset* >		_resets;
		std::vector< std::string >	_permissions;

		// Protected methods...
		void	setAreaID( const int& AreaID );

	public:
		// Constructors...
		Area();
		Area( const Area& );	// Doesn't change _AreaID
		Area( const std::string& keyword );
		~Area();

		// Operators...
		Area&	operator = ( const Area& );			// Doesn't change _AreaID
		bool	operator == ( const Area& ) const;	// Compares _firstv
		bool	operator != ( const Area& ) const;	// Compares _firstv
		bool	operator < ( const Area& ) const;	// Compares _firstv
		bool	operator > ( const Area& ) const;	// Compares _firstv

		// Public accessor methods...
		int			getAreaID( void ) const;
		void		setNumber( const unsigned& number );
		unsigned	getNumber( void ) const;
		void		setFirstv( const unsigned& firstv );
		unsigned	getFirstv( void ) const;
		void		setLastv( const unsigned& lastv );
		unsigned	getLastv( void ) const;
		void		setSize( const unsigned& size );
		unsigned	getSize( void ) const;
		void		setFlags( const int& flags );
		int			getFlags( void ) const;
		void		setNextReset( const time_t& nextReset );
		time_t		getNextReset( void ) const;
		void		setKeyword( const std::string& keyword );
		std::string	getKeyword( void ) const;
		void		setFile( const std::string& file );
		std::string	getFile( void ) const;
		void		setName( const std::string& name );
		std::string	getName( void ) const;
		std::vector< Room* >&			getRooms( void );
		std::vector< Mob* >&			getMobs( void );
		std::vector< Object* >&			getObjects( void );
		std::vector< Reset* >&			getResets( void );
		std::vector< std::string >&		getPermissions( void );

		// General methods...
		Room*	addRoom( void );
		Room*	add( Room* room );
		Room*	getRoom( const unsigned& vnum );
		bool	drop( Room* room );

		Mob*	addMob( void );
		Mob*	add( Mob* mob );
		Mob*	getMob( const unsigned& vnum );
		bool	drop( Mob* mob );

		void	readObject( std::istream& read );
		Object*	add( Object* object );
		Object*	getObject( const unsigned& vnum );
		bool	drop( Object* object );
		Object*	createObject( const unsigned& vnum, const unsigned& room_vnum, const unsigned& number, const unsigned& limit );

		Reset*	addReset( void );
		Reset*	add( Reset* reset );
		Reset*	getReset( const int& i );
		bool	dropReset( const int& i );
		void	addPermission( const std::string& name );
		bool	hasPermission( Character* character );
		bool	dropPermission( const std::string& name );
		void	reset( void );

		// Static members and methods...
		static int	areaIndex;	// Used to create a unique id for every Area object
		static int	numAreas;	// Keeps track of the total number of Area objects
};

// Associated operators...
std::ostream& operator << ( std::ostream& write, Area& area );
std::ostream& operator << ( std::ostream& write, Area* area );
std::istream& operator >> ( std::istream& read, Area& area );
std::istream& operator >> ( std::istream& read, Area* area );

//////////////////////////////////////////////   END AREA   //////////////////////////////////////////////

//////////////////////////////////////////////   ROOM   //////////////////////////////////////////////

class Room {
	protected:
		// Protected data...
		int			_RoomID;	// Holds a unique value for every instantiation.
		unsigned	_vnum;
		unsigned	_sector;
		unsigned	_flags;
		Area*		_area;
		std::string	_name;
		std::string	_desc;
		char		_descolor;
		Exit		_exits[6];		// Array set with length 6.
		std::vector< Character* >	_characters;
		std::vector< Mob* >			_mobs;
		std::vector< Object* >		_objects;

		// Protected methods...
		void	setRoomID( const int& RoomID );
		void	setDescolor( const char& descolor );

	public:
		// Constructors...
		Room( const unsigned& vnum = 0, Area* area = NULL );
		Room( Room& );	// Doesn't change _RoomID
		~Room();

		// Operators...
		Room& operator = ( Room& );					// Doesn't change _RoomID
		bool operator == ( Room& );					// Compares _vnum
		bool operator != ( Room& );					// Compares _vnum
		bool operator < ( const Room& ) const;		// Compares _vnum
		bool operator > ( const Room& ) const;		// Compares _vnum
		Exit& operator [] ( const unsigned& i );	// Returns the exit at offset i

		// Public accessor methods...
		int			getRoomID( void ) const;
		void		setVnum( const unsigned& vnum );
		unsigned	getVnum( void ) const;
		void		setArea( Area* area );
		Area*		getArea( void ) const;
		void		setSector( const unsigned& sector );
		unsigned	getSector( void ) const;
		void		setFlags( const unsigned& flags );
		unsigned	getFlags( void ) const;
		void		setName( const std::string& name );
		std::string	getName( void ) const;
		void		setDesc( const std::string& desc );
		std::string	getDesc( void ) const;
		std::string* getDescP( void );
		char		getDescolor( void ) const;
		Exit*		getExit( const unsigned& i );
		void		setExit( const unsigned& i, Exit* exit );

		// For Characters...
		std::vector< Character* >&	getCharacters( void );
		Character*					add( Character* character );
		Character*					getCharacter( const int& i );			// Returns the Character at offset i.
		Character*					getCharacter( const std::string& name );
		bool						drop( Character* character );			// Returns true on success.
		bool						dropCharacter( std::string& name );		// Returns true on success.
		// For Mobs...
		std::vector< Mob* >&	getMobs( void );
		Mob*					add( Mob* mob );
		Mob*					getMob( const int& i );				// Returns the Mob at offset i.
		Mob*					getMob( const std::string& name );
		bool					drop( Mob* mob );					// Returns true on success.
		bool					dropMob( std::string& name );		// Returns true on success.
		// For Objects...
		std::vector< Object* >&	getObjects( void );
		Object*					add( Object* object );
		Object*					getObject( const int& i );			// Returns the Object at offset i.
		Object*					getObject( const std::string& name );
		bool					drop( Object* object );				// Returns true on success.
		bool					dropObject( std::string& name );	// Returns true on success.

		// General methods...
		void	send( const std::string& message );
		bool	noExits( void );

		// Static members and methods...
		static int	roomIndex;									// Used to create a unique id for every Room object
		static int	numRooms;									// Keeps track of the total number of Room objects
		static std::string sector2string( const unsigned& );	// Returns the string name of the given sector
};

// Associated operators...
std::ostream& operator << ( std::ostream& write, Room& room );
std::ostream& operator << ( std::ostream& write, Room* room );
std::istream& operator >> ( std::istream& read, Room& room );
std::istream& operator >> ( std::istream& read, Room* room );

//////////////////////////////////////////////   END ROOM   //////////////////////////////////////////////

//////////////////////////////////////////////   OBJECT   //////////////////////////////////////////////

class Object { // ADT
	protected:
		// Protected data...
		int			_ObjectID;	// Holds a unique value for every instantiation.
		unsigned	_vnum;
		OBJECT_TYPE	_type;		// Non-negative
		int			_weight;	// Non-negative
		int			_flags;
		std::string	_name;
		std::string	_shortDesc;
		std::string	_longDesc;
		std::string	_fullDesc;

		// Protected methods...
		void		setObjectID( const int& ObjectID );
		std::string	objectDisplay( const std::string& );

	public:
		// Constructors...
		Object();
		Object( const Object& );	// Doesn't change _ObjectID
		virtual ~Object();

		// Operators...
		Object&	operator = ( const Object& );			// Doesn't change _ObjectID
		bool	operator == ( const Object& ) const;	// Compares _vnum
		bool	operator != ( const Object& ) const;	// Compares _vnum
		bool	operator < ( const Object& ) const;		// Compares _vnum
		bool	operator > ( const Object& ) const;		// Compares _vnum

		// Public accessor methods...
		int			getObjectID( void ) const;
		void		setVnum( const unsigned& vnum );
		unsigned	getVnum( void ) const;
		void		setType( const OBJECT_TYPE& type );
		OBJECT_TYPE	getType( void ) const;
		void		setWeight( const int& weight );
		int			getWeight( void ) const;
		void		setFlags( const int& flags );
		int			getFlags( void ) const;
		void		setName( const std::string& name );
		std::string	getName( void ) const;
		void		setShortDesc( const std::string& shortDesc );
		std::string	getShortDesc( void ) const;
		void		setLongDesc( const std::string& longDesc );
		std::string	getLongDesc( void ) const;
		void		setFullDesc( const std::string& fullDesc );
		std::string	getFullDesc( void ) const;
		std::string* getFullDescP( void );

		// General methods...
		void	oSave( std::ostream& write );			// Sends base object data to ostream.
		void	copyBaseData( const Object& ref );
		virtual void copy( Object* object ) = 0;
		virtual void load( std::istream& read ) = 0;
		virtual void save( std::ostream& write ) = 0;

		// Static data...
		static int	objectIndex;	// Used to create a unique id for every Object object
		static int	numObjects;		// Keeps track of the total number of Object objects

		// Static methods...
		static std::string	type2string( const OBJECT_TYPE& type );
		static OBJECT_TYPE	string2type( const std::string& type );
		static Object*		getNewObject( const OBJECT_TYPE& type, Object* object = NULL );

		// methods for derived class Armor...
		// methods for derived class Accessory...
		// methods for derived class Body_Part...
		// methods for derived class Coin...
		// methods for derived class Clothing...
		// methods for derived class Container...
		// methods for derived class Drink...
		// methods for derived class Food...
		// methods for derived class Furniture...
		// methods for derived class Jewelry...
		// methods for derived class Scroll...
		// methods for derived class Trash...
		// methods for derived class Wand...
		// methods for derived class Weapon...
};

std::ostream& operator << ( std::ostream& write, Object& object );
std::ostream& operator << ( std::ostream& write, Object* object );

//////////////////////////////////////////////   END OBJECT   //////////////////////////////////////////////

//////////////////////////////////////////////   CREATURE   //////////////////////////////////////////////
/* Notes:
	1) Creature::setRoom() is virtual so that Character can override it to check for permissions
	   if in REDIT mode.
*/

class Creature {
	protected:
		// Protected data...
		int			_CreatureID;	// Holds a unique value for every instantiation.
		std::string	_name;
		std::string	_shortDesc;
		std::string	_longDesc;
		std::string	_fullDesc;
		std::string	_strHeight;
		std::string	_strWeight;
		Area*		_area;
		Room*		_room;
		Creature*	_creature;
		Mob*		_mob;
		Character*	_character;
		unsigned	_race;
		unsigned	_class;
		unsigned	_pos;
		unsigned	_level;
		unsigned	_str;
		unsigned	_maxStr;
		unsigned	_dex;
		unsigned	_maxDex;
		unsigned	_con;
		unsigned	_maxCon;
		unsigned	_intel;
		unsigned	_maxIntel;
		unsigned	_wis;
		unsigned	_maxWis;
		unsigned	_cha;
		unsigned	_maxCha;
		unsigned	_hp;
		unsigned	_maxHp;
		unsigned	_mana;
		unsigned	_maxMana;
		unsigned	_move;
		unsigned	_maxMove;
		unsigned	_ac;
		int			_acBash;
		int			_acSlash;
		int			_acPierce;
		int			_acExotic;
		unsigned	_hr;
		unsigned	_dr;
		int			_saves;
		unsigned	_wimpy;
		unsigned	_gender;
		unsigned	_height;
		unsigned	_weight;
		unsigned	_age;
		unsigned	_gold;
		unsigned	_silver;
		std::vector< Object* >	_inventory;

		// Protected methods...
		void	setCreatureID( const int& CreatureID );

	public:
		// Constructors...
		Creature();
		Creature( const Creature& );	// Doesn't change _CreatureID
		virtual ~Creature();

		// Operators...
		Creature& operator = ( const Creature& );	// Doesn't change _CreatureID
		bool operator == ( const Creature& ) const;	// Compares _level
		bool operator != ( const Creature& ) const; // Compares _level
		bool operator < ( const Creature& ) const;	// Compares _level
		bool operator > ( const Creature& ) const;	// Compares _level

		// Public accessor methods...
		int				getCreatureID( void ) const;
		void			setName( const std::string& name );
		std::string		getName( void ) const;
		void			setShortDesc( const std::string& shortDesc );
		std::string		getShortDesc( void ) const;
		void			setLongDesc( const std::string& longDesc );
		std::string		getLongDesc( void ) const;
		void			setFullDesc( const std::string& fullDesc );
		std::string		getFullDesc( void ) const;
		std::string*	getFullDescP( void );
		void			setStrHeight( const std::string& strHeight );
		std::string		getStrHeight( void ) const;
		void			setStrWeight( const std::string& strWeight );
		std::string		getStrWeight( void ) const;
		void			setArea( Area* area );
		Area*			getArea( void ) const;
		virtual void	setRoom( Room* room ) = 0;
		Room*				getRoom( void ) const;
		void			setCreature( Creature* creature );
		Creature*		getCreature( void ) const;
		void			setMob( Mob* mob );
		Mob*			getMob( void ) const;
		void			setCharacter( Character* character );
		Character*		getCharacter( void ) const;
		void			setPos( const unsigned& pos );
		unsigned		getPos( void ) const;
		void			setRace( const unsigned& race );
		unsigned		getRace( void ) const;
		void			setClass( const unsigned& class_ );
		unsigned		getClass( void ) const;
		void			setLevel( const unsigned& level );
		unsigned		getLevel( void ) const;
		void			setStr( const unsigned& str );
		unsigned		getStr( void ) const;
		void			setMaxStr( const unsigned& maxStr );
		unsigned		getMaxStr( void ) const;
		void			setDex( const unsigned& dex );
		unsigned		getDex( void ) const;
		void			setMaxDex( const unsigned& maxDex );
		unsigned		getMaxDex( void ) const;
		void			setCon( const unsigned& con );
		unsigned		getCon( void ) const;
		void			setMaxCon( const unsigned& maxCon );
		unsigned		getMaxCon( void ) const;
		void			setIntel( const unsigned& intel );
		unsigned		getIntel( void ) const;
		void			setMaxIntel( const unsigned& maxIntel );
		unsigned		getMaxIntel( void ) const;
		void			setWis( const unsigned& wis );
		unsigned		getWis( void ) const;
		void			setMaxWis( const unsigned& maxWis );
		unsigned		getMaxWis( void ) const;
		void			setCha( const unsigned& cha );
		unsigned		getCha( void ) const;
		void			setMaxCha( const unsigned& maxCha );
		unsigned		getMaxCha( void ) const;
		void			setHp( const unsigned& hp );
		unsigned		getHp( void ) const;
		void			setMaxHp( const unsigned& maxHp );
		unsigned		getMaxHp( void ) const;
		void			setMana( const unsigned& mana );
		unsigned		getMana( void ) const;
		void			setMaxMana( const unsigned& maxMana );
		unsigned		getMaxMana( void ) const;
		void			setMove( const unsigned& move );
		unsigned		getMove( void ) const;
		void			setMaxMove( const unsigned& maxMove );
		unsigned		getMaxMove( void ) const;
		void			setAc( const unsigned& ac );
		unsigned		getAc( void ) const;
		void			setAcBash( const int& acBash );
		int				getAcBash( void ) const;
		void			setAcSlash( const int& acSlash );
		int				getAcSlash( void ) const;
		void			setAcPierce( const int& acPierce );
		int				getAcPierce( void ) const;
		void			setAcExotic( const int& acExotic );
		int				getAcExotic( void ) const;
		void			setHr( const unsigned& hr );
		unsigned		getHr( void ) const;
		void			setDr( const unsigned& dr );
		unsigned		getDr( void ) const;
		void			setSaves( const int& saves );
		int				getSaves( void ) const;
		void			setWimpy( const unsigned& wimpy );
		unsigned		getWimpy( void ) const;
		void			setGender( const unsigned& gender );
		unsigned		getGender( void ) const;
		void			setHeight( const unsigned& height );
		unsigned		getHeight( void ) const;
		void			setWeight( const unsigned& weight );
		unsigned		getWeight( void ) const;
		void			setAge( const unsigned& age );
		unsigned		getAge( void ) const;
		void			setGold( const unsigned& gold );
		unsigned		getGold( void ) const;
		void			setSilver( const unsigned& silver );
		unsigned		getSilver( void ) const;
		std::vector< Object* >&	getInventory( void );

		// General methods...
		Object*	add( Object* object );
		Object*	getObject( const std::string& name );
		bool	dropObject( const std::string& name );
		bool	drop( Object* object );
		void	save( std::ostream& write );
		void	load( std::istream& read );
		bool	hasPermission( Creature* creature );

		// Static members and methods...
		static int	creatureIndex;	// Used to create a unique id for every Creature object
		static int	numCreatures;	// Keeps track of the total number of Creature objects
		static std::string	gender2string( const unsigned& gender );
		static unsigned		string2gender( const std::string& gender );
		static std::string	race2string( const unsigned& race );
		static unsigned		string2race( const std::string& race );
		static std::string	class2string( const unsigned& class_ );
		static unsigned		string2class( const std::string& class_ );
};

// Associated operators...
std::ostream& operator << ( std::ostream& write, Creature& creature );
std::ostream& operator << ( std::ostream& write, Creature* creature );
std::istream& operator >> ( std::istream& read, Creature& creature );
std::istream& operator >> ( std::istream& read, Creature* creature );

//////////////////////////////////////////////   END CREATURE   //////////////////////////////////////////////

//////////////////////////////////////////////   CHARACTER   //////////////////////////////////////////////

class Character: public Creature {
	protected:
		// Protected data...
		unsigned	_id;
		bool		_gotInput;
		bool		_disconnected;
		std::string	_reply;
		std::string _lastInput;
		std::string	_repeat;
		std::string	_prompt;
		std::string	_poofin;
		std::string	_poofout;
		std::string	_password;
		std::string	_lastName;
		std::string	_profession;
		std::string	_clan;
		std::string	_title;
		std::string	_eyeDesc;
		std::string	_eyeColor;
		std::string	_hairDesc;
		std::string	_hairColor;
		std::string	_house;
		Socket*		_socket;
		Object*		_object;
		Board*		_board;
		Note*		_note;
		std::vector< Note* >	_notes;
		unsigned	_flags;
		unsigned	_status;
		unsigned	_bankGold;
		unsigned	_bankSilver;
		unsigned	_mobDeaths;
		unsigned	_mobKills;
		unsigned	_pkDeaths;
		unsigned	_pkKills;
		unsigned	_exp;
		unsigned	_tnl;
		unsigned	_practices;
		unsigned	_trains;
		unsigned	_gains;
		unsigned	_hand;
		unsigned	_points;
		char		_echo;

		// Protected methods...
		void	setId( const unsigned& id );

	public:
		// Constructors...
		Character( bool copyover = false );
		Character( const Character& );
		virtual ~Character();

		// Operators...
		Character& operator = ( const Character& );

		// Public accessor methods...
		unsigned	getId( void ) const;
		void		setGotInput( const bool& gotInput );
		bool		getGotInput( void ) const;
		void		setDisconnected( const bool& disconnected );
		bool		getDisconnected( void ) const;
		void		setReply( const std::string& reply );
		std::string	getReply( void ) const;
		void		setLastInput( const std::string& lastInput );
		std::string getLastInput( void ) const;
		void		setRepeat( const std::string& repeat );
		std::string	getRepeat( void ) const;
		void		setPrompt( const std::string& prompt );
		std::string	getPrompt( void ) const;
		void		setPoofin( const std::string& poofin );
		std::string	getPoofin( void ) const;
		void		setPoofout( const std::string& poofout );
		std::string	getPoofout( void ) const;
		void		setPassword( const std::string& password );
		std::string	getPassword( void ) const;
		void		setLastName( const std::string& lastName );
		std::string	getLastName( void ) const;
		void		setProfession( const std::string& profession );
		std::string	getProfession( void ) const;
		void		setClan( const std::string& clan );
		std::string	getClan( void ) const;
		void		setTitle( const std::string& title );
		std::string	getTitle( void ) const;
		void		setEyeDesc( const std::string& eyeDesc );
		std::string	getEyeDesc( void ) const;
		void		setEyeColor( const std::string& eyeColor );
		std::string	getEyeColor( void ) const;
		void		setHairDesc( const std::string& hairDesc );
		std::string	getHairDesc( void ) const;
		void		setHairColor( const std::string& hairColor );
		std::string	getHairColor( void ) const;
		void		setHouse( const std::string& house );
		std::string	getHouse( void ) const;
		virtual void setRoom( Room* room ); // This is pure virtual in Creature
		void		setSocket( Socket* socket );
		Socket*		getSocket( void ) const;
		void		setObject( Object* object );
		Object*		getObject( void ) const;
		void		setBoard( Board* board );
		Board*		getBoard( void ) const;
		void		setNote( Note* note );
		Note*		getNote( void ) const;
		std::vector< Note* >&	getNotes( void );
		void		setFlags( const unsigned& flags );
		unsigned	getFlags( void ) const;
		void		setTedit( const bool& tedit );
		bool		getTedit( void ) const;
		void		setOmninet( const bool& omninet );
		void		setOmninet( const unsigned& which, const bool& set );
		bool		getOmninet( void ) const;
		bool		getOmninet( const unsigned& which ) const;
		void		setStatus( const unsigned& status );
		unsigned	getStatus( void ) const;
		void		setBankGold( const unsigned& bankGold );
		unsigned	getBankGold( void ) const;
		void		setBankSilver( const unsigned& bankSilver );
		unsigned	getBankSilver( void ) const;
		void		setMobDeaths( const unsigned& mobDeaths );
		unsigned	getMobDeaths( void ) const;
		void		setMobKills( const unsigned& mobKills );
		unsigned	getMobKills( void ) const;
		void		setPkDeaths( const unsigned& pkDeaths );
		unsigned	getPkDeaths( void ) const;
		void		setPkKills( const unsigned& pkKills );
		unsigned	getPkKills( void ) const;
		void		setExp( const unsigned& exp );
		unsigned	getExp( void ) const;
		void		setTnl( const unsigned& tnl );
		unsigned	getTnl( void ) const;
		void		setPractices( const unsigned& practices );
		unsigned	getPractices( void ) const;
		void		setTrains( const unsigned& trains );
		unsigned	getTrains( void ) const;
		void		setGains( const unsigned& gains );
		unsigned	getGains( void ) const;
		void		setHand( const unsigned& hand );
		unsigned	getHand( void ) const;
		void		setPoints( const unsigned& points );
		unsigned	getPoints( void ) const;
		void		setEcho( const char& echo );
		char		getEcho( void ) const;

		// General methods...
		void		Send( char *, ... );
		void		Send( const std::string& );
		void		flushOutput( void );
		std::string promptSwitch( char c );
		std::string formatPrompt();
		Note*		addNote( void );
		bool		save( void );
		bool		load( void );
		void		record( const std::string& message );
		std::string stringHand();

		// Static members and methods...
		static int	characterIndex;	// Used to create a unique id for every Character object
		static int	numCharacters;	// Keeps track of the total number of Character objects
		static std::string hand2string( const unsigned& hand );
};

// Associated operators...
std::ostream& operator << ( std::ostream& write, Character& character );
std::ostream& operator << ( std::ostream& write, Character* character );
std::istream& operator >> ( std::istream& read, Character& character );
std::istream& operator >> ( std::istream& read, Character* character );

//////////////////////////////////////////////   END CHARACTER   //////////////////////////////////////////////

//////////////////////////////////////////////   MOB   //////////////////////////////////////////////

class Mob: public Creature {
	protected:
		// Protected data...
		int			_MobID;	// Holds a unique value for every instantiation.
		unsigned	_vnum;
		unsigned	_flags;
		time_t		_whenMove;

		// Protected methods...
		void	setMobID( const int& MobID );
		void	move( void );
		void	reset( void );

	public:
		// Constructors...
		Mob();
		Mob( const unsigned& vnum );
		Mob( const Mob& );	// Doesn't change _MobID
		~Mob();

		// Operators...
		Mob& operator = ( const Mob& );			// Doesn't change _MobID

		// Public accessor methods...
		int			getMobID( void ) const;
		virtual void setRoom( Room* room ); // This is pure virtual in Creature.
		void		setVnum( const unsigned& vnum );
		unsigned	getVnum( void ) const;
		void		setFlags( const unsigned& flags );
		unsigned	getFlags( void ) const;
		void		setWhenMove( const time_t& whenMove );
		time_t		getWhenMove( void ) const;

		// General methods...
		void	update( void );

		// Static members and methods...
		static int	mobIndex;	// Used to create a unique id for every Mob object
		static int	numMobs;	// Keeps track of the total number of Mob objects
};

// Associated operators...
std::ostream& operator << ( std::ostream& write, Mob& mob );
std::ostream& operator << ( std::ostream& write, Mob* mob );
std::istream& operator >> ( std::istream& read, Mob& mob );
std::istream& operator >> ( std::istream& read, Mob* mob );

//////////////////////////////////////////////   END MOB   //////////////////////////////////////////////



#endif // __H_COMBINED
